<div class="list-body">
    <form data-toggle="ajaxsearch" data-options="{searchDatagrid:$.CurrentNavtab.find('#syslog-list'),beforeSubmit:setSyslogSearchValue}">
  <div class="row">
        <div class="search">
            <select class="selectpicker show-tick form-control input-nm syslog" name="crud">
                    <option value=""  selected  >请选择操作类型</option>
                    <option value="添加">添加</option>
                    <option value="修改">修改</option>
                    <option value="删除">删除</option>
            </select> 
            
           <select class="selectpicker show-tick form-control input-nm syslog" name="module" >
                    <option value=""  selected  style = 'display：none;'>请选择操作模块</option>
                    <option value="用户">用户模块</option>
                    <option value="产品">产品模块</option>
                    <option value="设备">设备模块</option>
                    <option value="业务">业务模块</option>
                    <option value="应用平台">应用模块</option>
                    <option value="私有协议">私有协议模块</option>
                    <option value="私有协议字典">ktv协议字典模块</option>
                    <option value="通信协议字典">通信协议字典模块</option>
            </select>
            <input type="text" id="uname"  placeholder="请输入操作人" autocomplete="off" onblur="Trim(this,this.value)" style="width:200px;">
            <input type="hidden" id="unameDisNone" name="uname" >
           
                <div class="search-input">
                    <span class="position-relative">
                         <input type="text" name="createdate" id="dataDate" style="width: 240px">
                        <a class="date-icon dateIcon"><i class="fa fa-calendar"></i></a>
                    </span>
                </div>
  
            <div style="display: none;">
                    <input type="text" name="pageCurrent" value="1">
                    <input type="text" name="pageSize" value="15">
                </div>
       <div class="search-input">
       <button type="submit" class="search-btn" data-icon="search"></button>
       </div>
        </div>
    </div>
    <div class="row">
            <table id="syslog-list" class="table table-bordered"></table>
    </div>
  </form>
    <div id="pagination_callback_id" style="text-align: center;"></div>
</div>

<script type="text/javascript">
    $(function(){
        // 
     $('[name="crud"]').selectpicker();  //初始化
      // $('[name="crud"]').css("width",200px);
     $('[name="module"]').selectpicker();  //初始化
       $('#dataDate').datepicker({
            dateFormat: "yy-mm-dd",
            dayNamesMin: [ "日", "一", "二", "三", "四", "五", "六" ],
            monthNames: [ "1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月" ],
            changeYear: true,
            yearSuffix: '年', //年的后缀 
            maxDate:$.get_today()
        });
        $('.dateIcon').click(function () {
            $('#dataDate').focus();
        });
    $('#syslog-list').datagrid({
        height:'80%',
        tableWidth:'100%',
        filterThead:false,
        gridTitle:'日志列表',
       local:'remote',
        dataUrl:'/syslog/list',
        columns:[
              {
                name: 'title',
                label: '标题',
                align: 'center',
                menu:false,
                quicksort:false,
              },
              {
                name: 'content',
                label: '操作内容',
                align: 'center',
                menu:false,
                quicksort:false,
                // width: 70,
                },
                {
               name: 'uname',
                label: '操作人',
                align: 'center',
                menu:false,
                quicksort:false,
                // width: 70,
                },
                {
                name: 'createdate',
                label: '操作时间',
                align: 'center',
                menu:false,
                quicksort:false,
                // width: 70,
                }
            ],
        paging:{pageSize:15,pageCurrent:1},
        showLinenumber:false
    }) 
    $("input").placeholder();
})
function setSyslogSearchValue(from){
    $('#uname').val()!='请输入操作人' ? $('#unameDisNone').val($('#uname').val()) : $('#unameDisNone').val('');
    
      return true;
}
</script>
